<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="http://127.0.0.1:80/web-apps/apps/api/documents/api.js"></script>
</head>
<body style="height: 100%; margin: 0;">
<div id="document-editor" style="height: 600px;"></div>

<script>
    // 初始化 ONLYOFFICE 文档编辑器
    var docEditor = new DocsAPI.DocEditor("document-editor", {
        document: {
            key: "XRB",  // 唯一标识文档的 key
            title: "example.xlsx",
            url: "http://192.168.50.124:8080/download",
            fileType: "xlsx",
            permissions: {
                edit: true,  // 是否允许编辑
                review: false,  // 是否允许审阅
                comment: false  // 是否允许评论
            }
        },
        documentType: "cell",  // 文档类型：word, cell, slide
        editorConfig: {
            callbackUrl: "http://192.168.50.124:8080/upload",  // 回调 URL
            user: {
                id: "user-id",
                name: "许荣北"
            },
            mode: "edit",  // 编辑模式：edit, view
            lang: "zh",  // 语言
            customization: {
                chat: false,  // 禁用聊天
                comments: false,  // 禁用评论
                coAuthoring: false  // 禁用协同编辑
            }
        }
    });
</script>
</body>
</html>